#include "MethodsView.h"

MethodsView::MethodsView(QWidget *parent) : QWidget(parent)
{
    this->initUI();
}

void MethodsView::initUI(){
    QGridLayout *MainLayout = new QGridLayout();
    MainLayout->setMargin(20);
    MainLayout->setSpacing(10);
    this->setLayout(MainLayout);

    this->SchemaFileName = new QLineEdit();
    this->Location = new QLineEdit();
    this->Description = new QLineEdit();
    this->SchemaContentEdit = new QTextEdit(tr(""));

    MainLayout->addWidget(new QLabel(tr("Schema Name ")),0,0,1,1);
    MainLayout->addWidget(this->SchemaFileName,0,1,1,4,Qt::AlignLeft);
    MainLayout->addWidget(new QLabel(tr("Schema Path ")),1,0,1,1);
    MainLayout->addWidget(this->Location,1,1,1,4);
    MainLayout->addWidget(new QLabel(tr("Schema Description ")),2,0,1,1);
    MainLayout->addWidget(this->Description,2,1,1,4);
    MainLayout->addWidget(new QLabel(tr("Schema Content ")),3,0,1,1);
    MainLayout->addWidget(this->SchemaContentEdit,3,1,4,4);

}
void MethodsView::ShowInfo(QString  FileName,QString FilePath,QString Description,QString SchemaContent){
    this->SchemaFileName->setText(FileName);
    this->Location->setText(FilePath);
    this->Description->setText(Description);
    this->SchemaContentEdit->setText(SchemaContent);
}
